export interface IMescroll {
  optUp: {
    use: boolean
  }
  resetUpScroll: () => void
  endSuccess: () => void
  endErr: () => void
  onPullDownRefresh: () => void
  onPageScroll: (e: any) => void
  onReachBottom: () => void
}

export type MescrollInitEvent = {
  detail: {
    mescroll: IMescroll
  }
}

export type TypeUseMescroll = (
  onPageScroll?: (callback: (e: any) => void) => void,
  onReachBottom?: (hook: () => any, target?: any) => void,
  onPullDownRefresh?: (callback: () => void) => void
) => {
  getMescroll: () => IMescroll
  mescrollInit: (e: MescrollInitEvent, target: any) => void
  downCallback: () => void
  upCallback: () => void
}
